﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Mycontrol_tin_cung_loai : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Tin tin = new Tin();
        if (Request.QueryString["id"] != null)
        {
            List<ObjTin> lst = new List<ObjTin>();
            lst = tin.getTinByTinCungLoai(Request.QueryString["id"].ToString());
            if (lst.Count > 0)
            {
                CollectionPager1.DataSource = lst;
                CollectionPager1.BindToControl = rpt_tin;
                rpt_tin.DataSource = CollectionPager1.DataSourcePaged;
            }
            else
                lb_tin_lien_quan.Visible = false;
        }
    }
}